import { get, post } from "axios";

/** 登录 author: 王杰 modify: 王杰 */
export const login = (info) => {
    /************************ 模拟实现 start *************************/
    if(info.type == "account") {
        if(info.data.password != "123456") {
            return { flag: 200, result: { status: 0, msg: "用户名或密码错误!" } };
        }
    }
    if(info.type == "mobile") {
        if(info.data.verification != "123456") {
            return { flag: 200, result: { status: 0, msg: "验证码不正确!" } };
        }
    }
    return { flag: 200, result: { status: 1, session: { userName: "李吉姆" }} };
    /************************ 模拟实现 end *************************/
};

export default {
    login
}
